package com.millstein.feign;

import com.millstein.request.LockCouponRequest;
import com.millstein.util.JsonData;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @description:
 * @author: tsing
 * @create: 2021-09-24 08:39
 */
@FeignClient(name = "xdclass-coupon-service")
public interface CouponFeignService {

    @GetMapping("/api/coupon_record/v1/{coupon_record_id}")
    JsonData findCouponRecord(@PathVariable("coupon_record_id") Long couponRecordId);

    @PostMapping("/api/coupon_record/v1/lock_coupon")
    JsonData lockCoupon(@ApiParam("锁定优惠券需要的信息") @RequestBody LockCouponRequest lockCouponRequest);
}
